package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CeshiMapper;
import com.ruoyi.system.domain.Ceshi;
import com.ruoyi.system.service.ICeshiService;

/**
 * ceshiService业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-27
 */
@Service
public class CeshiServiceImpl implements ICeshiService 
{
    @Autowired
    private CeshiMapper ceshiMapper;

    /**
     * 查询ceshi
     * 
     * @param bmname ceshi主键
     * @return ceshi
     */
    @Override
    public Ceshi selectCeshiByBmname(String bmname)
    {
        return ceshiMapper.selectCeshiByBmname(bmname);
    }

    /**
     * 查询ceshi列表
     * 
     * @param ceshi ceshi
     * @return ceshi
     */
    @Override
    public List<Ceshi> selectCeshiList(Ceshi ceshi)
    {
        return ceshiMapper.selectCeshiList(ceshi);
    }

    /**
     * 新增ceshi
     * 
     * @param ceshi ceshi
     * @return 结果
     */
    @Override
    public int insertCeshi(Ceshi ceshi)
    {
        ceshi.setCreateTime(DateUtils.getNowDate());
        return ceshiMapper.insertCeshi(ceshi);
    }

    /**
     * 修改ceshi
     * 
     * @param ceshi ceshi
     * @return 结果
     */
    @Override
    public int updateCeshi(Ceshi ceshi)
    {
        ceshi.setUpdateTime(DateUtils.getNowDate());
        return ceshiMapper.updateCeshi(ceshi);
    }

    /**
     * 批量删除ceshi
     * 
     * @param bmnames 需要删除的ceshi主键
     * @return 结果
     */
    @Override
    public int deleteCeshiByBmnames(String[] bmnames)
    {
        return ceshiMapper.deleteCeshiByBmnames(bmnames);
    }

    /**
     * 删除ceshi信息
     * 
     * @param bmname ceshi主键
     * @return 结果
     */
    @Override
    public int deleteCeshiByBmname(String bmname)
    {
        return ceshiMapper.deleteCeshiByBmname(bmname);
    }
}
